(function (window) { 
    var a = 1;
    window.a = a;
})(window);
console.log(a);